package com.cskaoyan.wordmemorize.controller.admin;

import com.cskaoyan.wordmemorize.common.result.Result;
import com.cskaoyan.wordmemorize.dto.admin.DeleteSubTopicOperateDTO;
import com.cskaoyan.wordmemorize.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class SubTopicController {

    @Autowired
    TopicService topicService;

    @DeleteMapping("admin/subtopic/{id}")
    public Result<DeleteSubTopicOperateDTO> deleteSubTopic(@PathVariable("id") Long id){
        DeleteSubTopicOperateDTO deleteSubTopicOperateDTO = topicService.deleteSubTopic(id);
        return Result.ok(deleteSubTopicOperateDTO);
    }

}
